package org.particles.domain;

import org.particles.domain.field.Field;
import org.particles.domain.field.FieldParams;

public interface Particle {

	Vector getSpacePlace();

	/**
	 * copies state from particle to this particle.
	 */
	void copyStateFrom(Particle particle);
	
	/**
	 * @return distance between particle and this particle.
	 */
	double distanceTo(Particle particle);

	Vector getImpulse();

	void setImpulse(Vector impulse);

	void setSpacePlace(Vector spacePlace);

	/**
	 * @return fields this particle embedded into.
	 */
	long getFields();
	
	double getRadius();
	
	void setRadius(double radius);
	
	/**
	 * if not null {@link Field Field} will use this values instead of
	 * his own default values (for all particles).
	 */
	FieldParams getFieldParams(long fieldMarker);
	
	/**
	 * @param fieldMarker bit mask.
	 * @param params parameters for field.
	 * @return true if put, false else.
	 */
	boolean setFieldParams(long fieldMarker, FieldParams params);
}
